Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - atx: cache poet proofs with lru #6336

Closed
wants to merge 3 commits into from

Conversation

dshulyak
Copy link
Contributor

followup for #6326

in current code poet proofs are fetched for every atx submitted to the node,
they are relatively large (140KB) and account for sizeable chunk of all reads executed on the atx handler codepath (25%).

they are also a perfect case for lru caching, they are mostly reused and replaced from epoch to epoch.

basic stats in recent epochs.

select round_id, count(*), max(length(poet)) from poets group by round_id;
25|42|146200
26|45|145936
27|45|145738
28|45|145903

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 72.50000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 81.7%. Comparing base (87893ee) to head (d71bc8d).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
activation/poetdb.go 66.6% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #6336     +/-   ##
=========================================
- Coverage     81.8%   81.7%   -0.1%     
=========================================
  Files          312     312             
  Lines        34606   34637     +31     
=========================================
+ Hits         28314   28328     +14     
- Misses        4461    4472     +11     
- Partials      1831    1837      +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

activation/poetdb.go Show resolved Hide resolved
activation/poetdb.go Outdated Show resolved Hide resolved
@dshulyak
Copy link
Contributor Author

@poszu updated with singleflight just in case, could you please check again?

@dshulyak
Copy link
Contributor Author

bors try

spacemesh-bors bot added a commit that referenced this pull request Sep 18, 2024
@spacemesh-bors
Copy link

try

Build failed:

@dshulyak
Copy link
Contributor Author

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Sep 20, 2024
followup for #6326

in current code poet proofs are fetched for every atx submitted to the node, 
they are relatively large (140KB) and account for sizeable chunk of all reads executed on the atx handler codepath (25%).

they are also a perfect case for lru caching, they are mostly reused and replaced from epoch to epoch.

basic stats in recent epochs.

```
select round_id, count(*), max(length(poet)) from poets group by round_id;
25|42|146200
26|45|145936
27|45|145738
28|45|145903
```
@spacemesh-bors
Copy link

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title atx: cache poet proofs with lru [Merged by Bors] - atx: cache poet proofs with lru Sep 20, 2024
@spacemesh-bors spacemesh-bors bot closed this Sep 20, 2024
@spacemesh-bors spacemesh-bors bot deleted the reuse-poet-proofs branch September 20, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants